<template>
  <div id="app">
    <list-table
					ref="table"
				
					:loading="loading"
					:totalPage="totalPage"
					:table="table"
					:config="config">
					<div slot="time" slot-scope="props">
						{{getTime(props.value)}}
					</div>
					<div slot="resValue" slot-scope="props">
						{{getResValue(props.value)}}
					</div>
					<div slot="status" slot-scope="props">
						{{props.value === '1' ? '已上传':'未上传'}}
					</div>
					<div slot="status1" slot-scope="props">
						{{props.value === '1' ? '已发布':'未发布'}}
					</div>
					<div slot="statusTime" slot-scope="props">
						{{getTimeLength(props.value)}}
					</div>
				</list-table>
  </div>
</template>

<script>
import listTable from './components/listTable.vue'

export default {
  name: 'App',
  components: {
    listTable
  },
  data(){
    return {
      totalPage: 0,
      loading: false,
			table: [],
			config: {
			header: {
      
          btnList: [
            {name: '新增'},
            {name: '批量发布', plain: true},
            {name: '批量删除', plain: true}
          ]
        },
        tableBtn: [
          {name: '详情'},
          {name: '修改'},
          {name: '预览'},
          {name: '删除'},
          {name: '发布'}
        ],
        tableBtnWidth: '60px',
        column: [
          {key: 'name', label: '名称'},
          {key: 'subType', label: '资源分类', custom: 'resValue'},
          {key: 'categoryName', label: '编目条目'},
          {key: 'videoTime', label: '节目时长', custom: 'statusTime'},
          {key: 'createdTime', label: '上传时间', custom: 'time'},
          /*{key: '', label: '上传状态', custom: 'status'},*/
          // {key: '', label: '进度', width: '30px'},
          {key: 'status', label: '发布状态', custom: 'status1'}
        ]
      }
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
